package com.zhengqing.softdemo.listener

import com.mybatisflex.annotation.InsertListener
import com.mybatisflex.annotation.UpdateListener
import com.zhengqing.softdemo.config.Slf4j.Companion.log
import com.zhengqing.softdemo.config.Slf4j
// import lombok.extern.slf4j.Slf4j

@Slf4j
class LoggerListener : InsertListener, UpdateListener {
    override fun onInsert(entity: Any) {
        // LoggerListener.log.info("插入数据：{}", entity)
        log.info("插入数据：{}", entity)
    }

    override fun onUpdate(entity: Any) {
        // LoggerListener.log.info("更新数据：{}", entity)
        log.info("更新数据：{}", entity)
    }
}